/*
 * SpriteBase.h
 *
 *  Created on: 3 avr. 2009
 *      Author: CHETIER
 */


#include"SDL/include/SDL.h"
#include <string.h>
#include <iostream>
#include <stdlib.h>


#ifndef SPRITEBASE_H_
#define SPRITEBASE_H_

/**
 * Base class for sprites
 */
class SpriteBase
{
protected:
	SDL_Surface *_srf_sprite;
	int _x, _y;
	bool _isTransparent;
	int _opacity;

public:
	/**
	 * Initialize the sprite
	 */
	virtual int initialize(void) = 0;

	/**
	 * Draw the sprite on the screen
	 */
	virtual int draw(SDL_Surface *pSreen);

	/**
	 * Get the transparent ability of the sprite
	 */
    bool getIsTransparent() const { return _isTransparent; }

    /**
     * Set the transparent ability of the sprite
     */
    void setIsTransparent(bool _isTransparent) { this->_isTransparent = _isTransparent; }

    /**
     * Get the opacity of the sprite
     */
    int getOpacity() const { return _opacity; }

    /**
     * Set the opacity of the sprite
     */
    void setOpacity(int _opacity)  { this->_opacity = _opacity; }

    /**
     * Set the X coordinate of the sprite
     */
    int getX() const { return _x; }

    /**
     * Get the Y coordinate of the sprite
     */
    void setX(int _x) { this->_x = _x; }

    /**
     * Get the width of the sprite
     */
    int getWidth() { return _srf_sprite->w; }

    /**
     * Set the height of the sprite
     */
	int getHeight() { return _srf_sprite->h; }
};


#endif /* SPRITEBASE_H_ */
